package com.cyys.controller;

import com.cyys.entity.Category;
import com.cyys.entity.CategoryGoods;
import com.cyys.response.Result;
import com.cyys.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 * @description CategoryController
 * @date 2022-05-31 14:33
 */
@RestController
@RequestMapping("/Category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("/CategoryList")
    public Result categoryList(Integer sid){

        List<Category> CategoryGoods = categoryService.getStoreId(sid);
        return Result.ok().data("CategoryGoods",CategoryGoods);
    }
}
